//
//  JSMLeavingHeaderShowCityDetailsModel.m
//  TakeYouTourTogether
//
//  Created by dllo on 15/12/2.
//  Copyright © 2015年 king. All rights reserved.
//

#import "JSMLeavingHeaderShowCityDetailsModel.h"
#import "JSMLeavingHeaderShowCityDetailsToolsModel.h"
#import "JSMLeavingHeaderShowCityDetailsHottestModel.h"
@implementation JSMLeavingHeaderShowCityDetailsModel

//- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
//    if ([key isEqualToString:@"tools"]) {
//        self.toolsMarr = [NSMutableArray array];
//        self.toolsMarr = [JSMLeavingHeaderShowCityDetailsToolsModel baseModelByArr:value];
//        NSLog(@"~~toolsMarr: %@", self.toolsMarr);
//    }
//    if ([key isEqualToString:@"hottest_sites"]) {
//        self.hottest_sitesMarr = [NSMutableArray array];
//        self.hottest_sitesMarr = [JSMLeavingHeaderShowCityDetailsHottestModel baseModelByArr:value];
//    }
//}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"tools"]) {
        self.toolsMarr = [NSMutableArray array];
        self.toolsMarr = [JSMLeavingHeaderShowCityDetailsToolsModel baseModelByArr:value];
        NSLog(@"~~toolsMarr: %@", self.toolsMarr);
    }
    if ([key isEqualToString:@"hottest_sites"]) {
        self.hottest_sitesMarr = [NSMutableArray array];
        self.hottest_sitesMarr = [JSMLeavingHeaderShowCityDetailsHottestModel baseModelByArr:value];
    }
}

//
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self) {
        self.toolsMarr = [aDecoder decodeObjectForKey:@"toolsMarr"];
        self.hottest_sitesMarr = [aDecoder decodeObjectForKey:@"hottest_sitesMarr"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.toolsMarr forKey:@"toolsMarr"];
    [aCoder encodeObject:self.hottest_sitesMarr forKey:@"hottest_sitesMarr"];
}

@end
